<%@page pageEncoding="UTF-8"%>
<%@page import="com.eos.system.utility.StringUtil"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="com.eos.data.datacontext.UserObject"%>
<%@ page import="commonj.sdo.DataObject"%>
<%@page import="com.eos.engine.component.ILogicComponent"%>
<%@page import="com.primeton.ext.engine.component.LogicComponentFactory"%>
<%@page import="com.eos.engine.component.ILogicComponent"%>
<html>
<!-- 
  - Author(s): shitf
  - Date: 2013-03-16 09:55:30
  - Description:
-->
<head>
<%@include file="/coframe/tools/skins/common.jsp" %>
<title>退出系统</title>
</head>
<%
	UserObject uo = (UserObject)request.getSession().getAttribute("userObject");
	// 写日志
	DataObject orgUser = (DataObject)uo.get("orgUser");
	// 登陆者所属BU
	String operatorId = orgUser.getString("operatorid");
	String empId = orgUser.getString("empid");
	String userName=uo.getUserName();
	String ip=(String)uo.getUserRemoteIP();
	Object[] result = null;
	// 逻辑构件名称****
	String componentName = "org.gocom.components.coframe.auth.LoginManager";
	// 逻辑流名称****
	String operationName = "commLogout";  
	ILogicComponent logicComponent = LogicComponentFactory.create(componentName);
	int size = 3;
	//逻辑流的输入参数
	Object[] params = new Object[size];
	params[0] = empId;
	params[1] = userName;
	params[2] = ip;
	try{
	    // 调用逻辑流
		result = logicComponent.invoke(operationName, params);
	}catch(Throwable e){};
%>
<body>
  <%
     session.invalidate();
     String _url=StringUtil.htmlFilter(request.getParameter("_url"));
     
     if(_url==null){
     	_url=request.getContextPath()+"/coframe/auth/login/login.jsp";
     }
     response.sendRedirect(_url);
   %>
</body>
</html>